#ifndef YXCONFIG_H
#define YXCONFIG_H

#define YX_CONFIG_FIXED_PATH "../conf/yx.cnf"

#define YX_CONFIG_INIT_PRIORITY 102

#define YX_CONFIG_LINE_MAX_LENGTH 1024

typedef struct {
    void  (*setProperty)(const char *key, void *value);
    void *(*haveProperty)(const char *key);
    void *(*getProperty)(const char *key);
    char *(*getStrProperty)(const char *key);
    int   (*getIntProperty)(const char *key);
    void  (*removeProperty)(const char *key);
    void *(*getAndRemoveProperty)(const char *key);
    char *(*chooseStrProperty)(const char *key, void *default_value);
    int   (*chooseIntProperty)(const char *key, int default_value);
    void  (*freeProperty)(void *property);
} YXConfig;

extern YXConfig yxConfig;

#endif // YXCONFIG_H
